﻿/*
* 创建者：LIYINFAI
* 创建时间：2023/10/15 11:40:00
* 描述：
* --------------------------------------
* 修改说明：
* --------------------------------------
*/
using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;

namespace CommonLibrary.Forms
{
    /// <summary>
    /// 对话框
    /// </summary>
    [Designer("System.Windows.Forms.Design.ParentControlDesigner, System.Design", typeof(System.ComponentModel.Design.IDesigner))]
    public partial class HWFrmDialog : HWFrmBase
    {
        private Color mTitleBarBackColor = SystemColors.GradientActiveCaption;
        /// <summary>
        /// 标题栏背景色
        /// </summary>
        [Description("标题栏背景色"), Category("自定义")]
        public Color TitleBarBackColor
        {
            get
            {
                return this.mTitleBarBackColor;
            }
            set
            {
                this.mTitleBarBackColor = value;
                this.panelTop.BackColor = value;
            }
        }
        private Color mTitleBarForeColor = Color.Black;
        /// <summary>
        /// 标题栏前景色
        /// </summary>
        [Description("标题栏前景色"), Category("自定义")]
        public Color TitleBarForeColor
        {
            get
            {
                return this.mTitleBarForeColor;
            }
            set
            {
                this.mTitleBarForeColor = value;
                this.panelTop.ForeColor = value;
            }
        }
        /// <summary>
        /// 窗体标题
        /// </summary>
        [Description("窗体标题"), Category("自定义")]
        public string Title
        {
            get
            {
                return lblTitle.Text;
            }
            set
            {
                lblTitle.Text = value;
            }
        }
        /// <summary>
        /// 消息内容
        /// </summary>
        [Description("消息内容"), Category("自定义")]
        public string Content
        {
            get
            {
                return labelMessage.Text;
            }
            set
            {
                labelMessage.Text = value;
            }
        }
        /// <summary>
        /// 构造函数
        /// </summary>
        public HWFrmDialog()
        {
            InitializeComponent();
            this.BorderStyleColor = ColorSettings.FORM_BORDER_COLOR;
        }
        private void HWFrmDialog_Shown(object sender, EventArgs e)
        {
        }
        private void HWFrmDialog_Load(object sender, EventArgs e)
        {
        }
        private void buttonYes_Click(object sender, EventArgs e)
        {
            this.Close();
        }
        private void HWFrmDialog_FormClosing(object sender, FormClosingEventArgs e)
        {
        }
    }
}

